home *** CD-ROM | disk | FTP | other *** search
/ Nebula 2 / Nebula Two.iso / NextAnswers / 2054_fsck_manpage.txt < prev    next >
Text File  |  1995-10-13  |  5KB  |  140 lines

  1.  
  2.  
  3. FSCK(8)             UNIX Programmer's Manual          FSCK(8)
  4.  
  5. NAME
  6.      fsck - file system consistency check and interactive repair
  7.  
  8. SYNOPSIS
  9.      /usr/etc/fsck -p [ filesystem ...    ]
  10.      /usr/etc/fsck [ -P ] [ -b block# ] [ -y ] [ -n ] [ filesys-
  11.      tem ] ...
  12.  
  13. DESCRIPTION
  14.      The first form of fsck preens a standard set of filesystems
  15.      or the specified file systems.  It is normally used in the
  16.      script /etc/rc during automatic reboot.  In this case fsck
  17.      reads the table /etc/fstab to determine which file systems
  18.      to check.    It uses the information there to inspect groups
  19.      of disks in parallel taking maximum advantage of i/o overlap
  20.      to check the file systems as quickly as possible.    Normally,
  21.      the root file system will be checked on pass 1, other
  22.      ``root'' (``a'' partition) file systems on pass 2, other
  23.      small file systems on separate passes (e.g. the ``d'' file
  24.      systems on pass 3 and the ``e'' file systems on pass 4), and
  25.      finally the large user file systems on the last pass, e.g.
  26.      pass 5.  Only partitions in fstab that are mounted ``rw'' or
  27.      ``rq'' and that have non-zero pass number are checked.
  28.  
  29.      The system takes care that only a restricted class of inno-
  30.      cuous inconsistencies can happen unless hardware or software
  31.      failures intervene.  These are limited to the following:
  32.  
  33.       Unreferenced inodes
  34.  
  35.       Link counts in inodes too large
  36.  
  37.       Missing blocks in the free list
  38.  
  39.       Blocks in the free list also in files
  40.  
  41.       Counts in the super-block wrong
  42.  
  43.      These are the only inconsistencies that fsck with the -p
  44.      option will correct; if it encounters other inconsistencies,
  45.      it exits with an abnormal return status and an automatic
  46.      reboot will then fail.  For each corrected inconsistency one
  47.      or more lines will be printed identifying the file system on
  48.      which the correction will take place, and the nature of the
  49.      correction.  After successfully correcting a file system,
  50.      fsck will print the number of files on that file system, the
  51.      number of used and free blocks, and the percentage of frag-
  52.      mentation.
  53.  
  54.      If sent a QUIT signal, fsck will finish the file system
  55.      checks, then exit with an abnormal return status that causes
  56.      the automatic reboot to fail.  This is useful when you wish
  57.      to finish the file system checks, but do not want the
  58.      machine to come up multiuser.
  59.  
  60.      Without the -p option, fsck audits and interactively repairs
  61.      inconsistent conditions for file systems. If the file system
  62.      is inconsistent the operator is prompted for concurrence
  63.      before each correction is attempted.  It should be noted
  64.      that some of the corrective actions which are not correct-
  65.      able under the -p option will result in some loss of data.
  66.      The amount and severity of data lost may be determined from
  67.      the diagnostic output.  The default action for each con-
  68.      sistency correction is to wait for the operator to respond
  69.      yes or no.  If the operator does not have write permission
  70.      on the file system fsck will default to a -n action.
  71.  
  72.      Fsck has more consistency checks than its predecessors
  73.      check, dcheck, fcheck, and icheck combined.
  74.  
  75.      The following flags are interpreted by fsck.
  76.  
  77.      -P    This flag forces fsck to check the disk even if the
  78.        clean flag is set on the disk's superblock.
  79.  
  80.      -b    Use the block specified immediately after the flag as
  81.        the super block for the file system.  Block 16 is
  82.        always an alternate super block.
  83.  
  84.      -y    Assume a yes response to all questions asked by fsck;
  85.        this should be used with great caution as this is a
  86.        free license to continue after essentially unlimited
  87.        trouble has been encountered.
  88.  
  89.      -n    Assume a no response to all questions asked by fsck;
  90.        do not open the file system for writing.
  91.  
  92.      If no filesystems are given to fsck then a default list of
  93.      file systems is read from the file /etc/fstab.
  94.  
  95.      Inconsistencies checked are as follows:
  96.  
  97.      1.    Blocks claimed by more than one inode or the free
  98.        list.
  99.      2.    Blocks claimed by an inode or the free list outside
  100.        the range of the file system.
  101.      3.    Incorrect link counts.
  102.      4.    Size checks:
  103.          Directory size not of proper format.
  104.      5.    Bad inode format.
  105.      6.    Blocks not accounted for anywhere.
  106.      7.    Directory checks:
  107.          File pointing to unallocated inode.
  108.          Inode number out of range.
  109.      8.    Super Block checks:
  110.  
  111.          More blocks for inodes than there are in the
  112.          file system.
  113.      9.    Bad free block list format.
  114.      10.   Total free block and/or free inode count incorrect.
  115.  
  116.      Orphaned files and directories (allocated but unreferenced)
  117.      are, with the operator's concurrence, reconnected by placing
  118.      them in the lost+found directory.    The name assigned is the
  119.      inode number.  If the lost+found directory does not exist,
  120.      it is created.  If there is insufficient space its size is
  121.      increased.
  122.  
  123.      Checking the raw device is almost always faster.
  124.  
  125. FILES
  126.      /etc/fstab           contains default list of file systems
  127.               to check.
  128.  
  129. DIAGNOSTICS
  130.      The diagnostics produced by fsck are fully enumerated and
  131.      explained in Appendix A of ``Fsck - The UNIX File System
  132.      Check Program'' (SMM:5).
  133.  
  134. SEE ALSO
  135.      fstab(5), fs(5), newfs(8), mkfs(8), crash(8V), reboot(8)
  136.  
  137. BUGS
  138.      There should be some way to start a fsck -p at pass n.
  139.  
  140.